//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS HealthLake service.
///
/// AWS HealthLake is a HIPAA eligibile service that allows customers to store, transform, query, and analyze their FHIR-formatted data in a consistent fashion in the cloud.
public struct HealthLake: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the HealthLake client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            amzTarget: "HealthLake",
            serviceName: "HealthLake",
            serviceIdentifier: "healthlake",
            serviceProtocol: .json(version: "1.0"),
            apiVersion: "2017-07-01",
            endpoint: endpoint,
            errorType: HealthLakeErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    /// Creates a data store that can ingest and export FHIR formatted data.
    @Sendable
    @inlinable
    public func createFHIRDatastore(_ input: CreateFHIRDatastoreRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateFHIRDatastoreResponse {
        try await self.client.execute(
            operation: "CreateFHIRDatastore", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a data store that can ingest and export FHIR formatted data.
    ///
    /// Parameters:
    ///   - clientToken: Optional user provided token used for ensuring idempotency.
    ///   - datastoreName: The user generated name for the data store.
    ///   - datastoreTypeVersion: The FHIR version of the data store. The only supported version is R4.
    ///   - identityProviderConfiguration: The configuration of the identity provider that you want to use for your data store.
    ///   - preloadDataConfig: Optional parameter to preload data upon creation of the data store. Currently, the only supported preloaded data is synthetic data generated from Synthea.
    ///   - sseConfiguration:  The server-side encryption key configuration for a customer provided encryption key specified for creating a data store.
    ///   - tags:  Resource tags that are applied to a data store when it is created.
    ///   - logger: Logger use during operation
    @inlinable
    public func createFHIRDatastore(
        clientToken: String? = CreateFHIRDatastoreRequest.idempotencyToken(),
        datastoreName: String? = nil,
        datastoreTypeVersion: FHIRVersion,
        identityProviderConfiguration: IdentityProviderConfiguration? = nil,
        preloadDataConfig: PreloadDataConfig? = nil,
        sseConfiguration: SseConfiguration? = nil,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateFHIRDatastoreResponse {
        let input = CreateFHIRDatastoreRequest(
            clientToken: clientToken, 
            datastoreName: datastoreName, 
            datastoreTypeVersion: datastoreTypeVersion, 
            identityProviderConfiguration: identityProviderConfiguration, 
            preloadDataConfig: preloadDataConfig, 
            sseConfiguration: sseConfiguration, 
            tags: tags
        )
        return try await self.createFHIRDatastore(input, logger: logger)
    }

    /// Deletes a data store.
    @Sendable
    @inlinable
    public func deleteFHIRDatastore(_ input: DeleteFHIRDatastoreRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteFHIRDatastoreResponse {
        try await self.client.execute(
            operation: "DeleteFHIRDatastore", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a data store.
    ///
    /// Parameters:
    ///   - datastoreId:  The AWS-generated ID for the data store to be deleted.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteFHIRDatastore(
        datastoreId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteFHIRDatastoreResponse {
        let input = DeleteFHIRDatastoreRequest(
            datastoreId: datastoreId
        )
        return try await self.deleteFHIRDatastore(input, logger: logger)
    }

    /// Gets the properties associated with the FHIR data store, including the data store ID, data store ARN, data store name, data store status, when the data store was created, data store type version, and the data store's endpoint.
    @Sendable
    @inlinable
    public func describeFHIRDatastore(_ input: DescribeFHIRDatastoreRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeFHIRDatastoreResponse {
        try await self.client.execute(
            operation: "DescribeFHIRDatastore", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets the properties associated with the FHIR data store, including the data store ID, data store ARN, data store name, data store status, when the data store was created, data store type version, and the data store's endpoint.
    ///
    /// Parameters:
    ///   - datastoreId: The AWS-generated data store ID.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeFHIRDatastore(
        datastoreId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeFHIRDatastoreResponse {
        let input = DescribeFHIRDatastoreRequest(
            datastoreId: datastoreId
        )
        return try await self.describeFHIRDatastore(input, logger: logger)
    }

    /// Displays the properties of a FHIR export job, including the ID, ARN, name, and the status of the job.
    @Sendable
    @inlinable
    public func describeFHIRExportJob(_ input: DescribeFHIRExportJobRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeFHIRExportJobResponse {
        try await self.client.execute(
            operation: "DescribeFHIRExportJob", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Displays the properties of a FHIR export job, including the ID, ARN, name, and the status of the job.
    ///
    /// Parameters:
    ///   - datastoreId: The AWS generated ID for the data store from which files are being exported from for an export job.
    ///   - jobId: The AWS generated ID for an export job.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeFHIRExportJob(
        datastoreId: String,
        jobId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeFHIRExportJobResponse {
        let input = DescribeFHIRExportJobRequest(
            datastoreId: datastoreId, 
            jobId: jobId
        )
        return try await self.describeFHIRExportJob(input, logger: logger)
    }

    /// Displays the properties of a FHIR import job, including the ID, ARN, name, and the status of the job.
    @Sendable
    @inlinable
    public func describeFHIRImportJob(_ input: DescribeFHIRImportJobRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeFHIRImportJobResponse {
        try await self.client.execute(
            operation: "DescribeFHIRImportJob", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Displays the properties of a FHIR import job, including the ID, ARN, name, and the status of the job.
    ///
    /// Parameters:
    ///   - datastoreId: The AWS-generated ID of the data store.
    ///   - jobId: The AWS-generated job ID.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeFHIRImportJob(
        datastoreId: String,
        jobId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeFHIRImportJobResponse {
        let input = DescribeFHIRImportJobRequest(
            datastoreId: datastoreId, 
            jobId: jobId
        )
        return try await self.describeFHIRImportJob(input, logger: logger)
    }

    /// Lists all FHIR data stores that are in the user’s account, regardless of data store status.
    @Sendable
    @inlinable
    public func listFHIRDatastores(_ input: ListFHIRDatastoresRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListFHIRDatastoresResponse {
        try await self.client.execute(
            operation: "ListFHIRDatastores", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all FHIR data stores that are in the user’s account, regardless of data store status.
    ///
    /// Parameters:
    ///   - filter: Lists all filters associated with a FHIR data store request.
    ///   - maxResults: The maximum number of data stores returned in a single page of a ListFHIRDatastoresRequest call.
    ///   - nextToken: Fetches the next page of data stores when results are paginated.
    ///   - logger: Logger use during operation
    @inlinable
    public func listFHIRDatastores(
        filter: DatastoreFilter? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListFHIRDatastoresResponse {
        let input = ListFHIRDatastoresRequest(
            filter: filter, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listFHIRDatastores(input, logger: logger)
    }

    ///  Lists all FHIR export jobs associated with an account and their statuses.
    @Sendable
    @inlinable
    public func listFHIRExportJobs(_ input: ListFHIRExportJobsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListFHIRExportJobsResponse {
        try await self.client.execute(
            operation: "ListFHIRExportJobs", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Lists all FHIR export jobs associated with an account and their statuses.
    ///
    /// Parameters:
    ///   - datastoreId:  This parameter limits the response to the export job with the specified data store ID.
    ///   - jobName:  This parameter limits the response to the export job with the specified job name.
    ///   - jobStatus:  This parameter limits the response to the export jobs with the specified job status.
    ///   - maxResults:  This parameter limits the number of results returned for a ListFHIRExportJobs to a maximum quantity specified by the user.
    ///   - nextToken:  A pagination token used to identify the next page of results to return for a ListFHIRExportJobs query.
    ///   - submittedAfter:  This parameter limits the response to FHIR export jobs submitted after a user specified date.
    ///   - submittedBefore:  This parameter limits the response to FHIR export jobs submitted before a user specified date.
    ///   - logger: Logger use during operation
    @inlinable
    public func listFHIRExportJobs(
        datastoreId: String,
        jobName: String? = nil,
        jobStatus: JobStatus? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        submittedAfter: Date? = nil,
        submittedBefore: Date? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListFHIRExportJobsResponse {
        let input = ListFHIRExportJobsRequest(
            datastoreId: datastoreId, 
            jobName: jobName, 
            jobStatus: jobStatus, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            submittedAfter: submittedAfter, 
            submittedBefore: submittedBefore
        )
        return try await self.listFHIRExportJobs(input, logger: logger)
    }

    ///  Lists all FHIR import jobs associated with an account and their statuses.
    @Sendable
    @inlinable
    public func listFHIRImportJobs(_ input: ListFHIRImportJobsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListFHIRImportJobsResponse {
        try await self.client.execute(
            operation: "ListFHIRImportJobs", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Lists all FHIR import jobs associated with an account and their statuses.
    ///
    /// Parameters:
    ///   - datastoreId:  This parameter limits the response to the import job with the specified data store ID.
    ///   - jobName:  This parameter limits the response to the import job with the specified job name.
    ///   - jobStatus:  This parameter limits the response to the import job with the specified job status.
    ///   - maxResults:  This parameter limits the number of results returned for a ListFHIRImportJobs to a maximum quantity specified by the user.
    ///   - nextToken:  A pagination token used to identify the next page of results to return for a ListFHIRImportJobs query.
    ///   - submittedAfter:  This parameter limits the response to FHIR import jobs submitted after a user specified date.
    ///   - submittedBefore:  This parameter limits the response to FHIR import jobs submitted before a user specified date.
    ///   - logger: Logger use during operation
    @inlinable
    public func listFHIRImportJobs(
        datastoreId: String,
        jobName: String? = nil,
        jobStatus: JobStatus? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        submittedAfter: Date? = nil,
        submittedBefore: Date? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListFHIRImportJobsResponse {
        let input = ListFHIRImportJobsRequest(
            datastoreId: datastoreId, 
            jobName: jobName, 
            jobStatus: jobStatus, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            submittedAfter: submittedAfter, 
            submittedBefore: submittedBefore
        )
        return try await self.listFHIRImportJobs(input, logger: logger)
    }

    ///  Returns a list of all existing tags associated with a data store.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Returns a list of all existing tags associated with a data store.
    ///
    /// Parameters:
    ///   - resourceARN:  The Amazon Resource Name(ARN) of the data store for which tags are being added.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceARN: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceARN: resourceARN
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Begins a FHIR export job.
    @Sendable
    @inlinable
    public func startFHIRExportJob(_ input: StartFHIRExportJobRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartFHIRExportJobResponse {
        try await self.client.execute(
            operation: "StartFHIRExportJob", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Begins a FHIR export job.
    ///
    /// Parameters:
    ///   - clientToken: An optional user provided token used for ensuring idempotency.
    ///   - dataAccessRoleArn: The Amazon Resource Name used during the initiation of the job.
    ///   - datastoreId: The AWS generated ID for the data store from which files are being exported for an export job.
    ///   - jobName: The user generated name for an export job.
    ///   - outputDataConfig: The output data configuration that was supplied when the export job was created.
    ///   - logger: Logger use during operation
    @inlinable
    public func startFHIRExportJob(
        clientToken: String? = StartFHIRExportJobRequest.idempotencyToken(),
        dataAccessRoleArn: String,
        datastoreId: String,
        jobName: String? = nil,
        outputDataConfig: OutputDataConfig,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartFHIRExportJobResponse {
        let input = StartFHIRExportJobRequest(
            clientToken: clientToken, 
            dataAccessRoleArn: dataAccessRoleArn, 
            datastoreId: datastoreId, 
            jobName: jobName, 
            outputDataConfig: outputDataConfig
        )
        return try await self.startFHIRExportJob(input, logger: logger)
    }

    /// Begins a FHIR Import job.
    @Sendable
    @inlinable
    public func startFHIRImportJob(_ input: StartFHIRImportJobRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartFHIRImportJobResponse {
        try await self.client.execute(
            operation: "StartFHIRImportJob", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Begins a FHIR Import job.
    ///
    /// Parameters:
    ///   - clientToken: Optional user provided token used for ensuring idempotency.
    ///   - dataAccessRoleArn: The Amazon Resource Name (ARN) that gives AWS HealthLake access permission.
    ///   - datastoreId: The AWS-generated data store ID.
    ///   - inputDataConfig: The input properties of the FHIR Import job in the StartFHIRImport job request.
    ///   - jobName: The name of the FHIR Import job in the StartFHIRImport job request.
    ///   - jobOutputDataConfig: 
    ///   - logger: Logger use during operation
    @inlinable
    public func startFHIRImportJob(
        clientToken: String? = StartFHIRImportJobRequest.idempotencyToken(),
        dataAccessRoleArn: String,
        datastoreId: String,
        inputDataConfig: InputDataConfig,
        jobName: String? = nil,
        jobOutputDataConfig: OutputDataConfig,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartFHIRImportJobResponse {
        let input = StartFHIRImportJobRequest(
            clientToken: clientToken, 
            dataAccessRoleArn: dataAccessRoleArn, 
            datastoreId: datastoreId, 
            inputDataConfig: inputDataConfig, 
            jobName: jobName, 
            jobOutputDataConfig: jobOutputDataConfig
        )
        return try await self.startFHIRImportJob(input, logger: logger)
    }

    ///  Adds a user specified key and value tag to a data store.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Adds a user specified key and value tag to a data store.
    ///
    /// Parameters:
    ///   - resourceARN:  The Amazon Resource Name(ARN)that gives AWS HealthLake access to the data store which tags are being added to.
    ///   - tags:  The user specified key and value pair tags being added to a data store.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceARN: String,
        tags: [Tag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceARN: resourceARN, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    ///  Removes tags from a data store.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Removes tags from a data store.
    ///
    /// Parameters:
    ///   - resourceARN: The Amazon Resource Name(ARN) of the data store for which tags are being removed.
    ///   - tagKeys:  The keys for the tags to be removed from the HealthLake data store.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceARN: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceARN: resourceARN, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }
}

extension HealthLake {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: HealthLake, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension HealthLake {
    /// Return PaginatorSequence for operation ``listFHIRDatastores(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listFHIRDatastoresPaginator(
        _ input: ListFHIRDatastoresRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListFHIRDatastoresRequest, ListFHIRDatastoresResponse> {
        return .init(
            input: input,
            command: self.listFHIRDatastores,
            inputKey: \ListFHIRDatastoresRequest.nextToken,
            outputKey: \ListFHIRDatastoresResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listFHIRDatastores(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filter: Lists all filters associated with a FHIR data store request.
    ///   - maxResults: The maximum number of data stores returned in a single page of a ListFHIRDatastoresRequest call.
    ///   - logger: Logger used for logging
    @inlinable
    public func listFHIRDatastoresPaginator(
        filter: DatastoreFilter? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListFHIRDatastoresRequest, ListFHIRDatastoresResponse> {
        let input = ListFHIRDatastoresRequest(
            filter: filter, 
            maxResults: maxResults
        )
        return self.listFHIRDatastoresPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listFHIRExportJobs(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listFHIRExportJobsPaginator(
        _ input: ListFHIRExportJobsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListFHIRExportJobsRequest, ListFHIRExportJobsResponse> {
        return .init(
            input: input,
            command: self.listFHIRExportJobs,
            inputKey: \ListFHIRExportJobsRequest.nextToken,
            outputKey: \ListFHIRExportJobsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listFHIRExportJobs(_:logger:)``.
    ///
    /// - Parameters:
    ///   - datastoreId:  This parameter limits the response to the export job with the specified data store ID.
    ///   - jobName:  This parameter limits the response to the export job with the specified job name.
    ///   - jobStatus:  This parameter limits the response to the export jobs with the specified job status.
    ///   - maxResults:  This parameter limits the number of results returned for a ListFHIRExportJobs to a maximum quantity specified by the user.
    ///   - submittedAfter:  This parameter limits the response to FHIR export jobs submitted after a user specified date.
    ///   - submittedBefore:  This parameter limits the response to FHIR export jobs submitted before a user specified date.
    ///   - logger: Logger used for logging
    @inlinable
    public func listFHIRExportJobsPaginator(
        datastoreId: String,
        jobName: String? = nil,
        jobStatus: JobStatus? = nil,
        maxResults: Int? = nil,
        submittedAfter: Date? = nil,
        submittedBefore: Date? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListFHIRExportJobsRequest, ListFHIRExportJobsResponse> {
        let input = ListFHIRExportJobsRequest(
            datastoreId: datastoreId, 
            jobName: jobName, 
            jobStatus: jobStatus, 
            maxResults: maxResults, 
            submittedAfter: submittedAfter, 
            submittedBefore: submittedBefore
        )
        return self.listFHIRExportJobsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listFHIRImportJobs(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listFHIRImportJobsPaginator(
        _ input: ListFHIRImportJobsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListFHIRImportJobsRequest, ListFHIRImportJobsResponse> {
        return .init(
            input: input,
            command: self.listFHIRImportJobs,
            inputKey: \ListFHIRImportJobsRequest.nextToken,
            outputKey: \ListFHIRImportJobsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listFHIRImportJobs(_:logger:)``.
    ///
    /// - Parameters:
    ///   - datastoreId:  This parameter limits the response to the import job with the specified data store ID.
    ///   - jobName:  This parameter limits the response to the import job with the specified job name.
    ///   - jobStatus:  This parameter limits the response to the import job with the specified job status.
    ///   - maxResults:  This parameter limits the number of results returned for a ListFHIRImportJobs to a maximum quantity specified by the user.
    ///   - submittedAfter:  This parameter limits the response to FHIR import jobs submitted after a user specified date.
    ///   - submittedBefore:  This parameter limits the response to FHIR import jobs submitted before a user specified date.
    ///   - logger: Logger used for logging
    @inlinable
    public func listFHIRImportJobsPaginator(
        datastoreId: String,
        jobName: String? = nil,
        jobStatus: JobStatus? = nil,
        maxResults: Int? = nil,
        submittedAfter: Date? = nil,
        submittedBefore: Date? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListFHIRImportJobsRequest, ListFHIRImportJobsResponse> {
        let input = ListFHIRImportJobsRequest(
            datastoreId: datastoreId, 
            jobName: jobName, 
            jobStatus: jobStatus, 
            maxResults: maxResults, 
            submittedAfter: submittedAfter, 
            submittedBefore: submittedBefore
        )
        return self.listFHIRImportJobsPaginator(input, logger: logger)
    }
}

extension HealthLake.ListFHIRDatastoresRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> HealthLake.ListFHIRDatastoresRequest {
        return .init(
            filter: self.filter,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension HealthLake.ListFHIRExportJobsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> HealthLake.ListFHIRExportJobsRequest {
        return .init(
            datastoreId: self.datastoreId,
            jobName: self.jobName,
            jobStatus: self.jobStatus,
            maxResults: self.maxResults,
            nextToken: token,
            submittedAfter: self.submittedAfter,
            submittedBefore: self.submittedBefore
        )
    }
}

extension HealthLake.ListFHIRImportJobsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> HealthLake.ListFHIRImportJobsRequest {
        return .init(
            datastoreId: self.datastoreId,
            jobName: self.jobName,
            jobStatus: self.jobStatus,
            maxResults: self.maxResults,
            nextToken: token,
            submittedAfter: self.submittedAfter,
            submittedBefore: self.submittedBefore
        )
    }
}
